Skip to content

Add AvdManagerRunner.ListDeviceProfilesAsync() for device profile enumeration#325

Open
rmarinho wants to merge 1 commit intomainfrom
features/321-list-device-profiles
Open

Add AvdManagerRunner.ListDeviceProfilesAsync() for device profile enumeration#325
rmarinho wants to merge 1 commit intomainfrom
features/321-list-device-profiles

Conversation

@rmarinho
Copy link
Copy Markdown
Member

@rmarinho rmarinho commented Apr 8, 2026

Summary

Add a method to enumerate available AVD device profiles (hardware definitions) from \�vdmanager list device.

Changes

  • Added \AvdDeviceProfile\ record (\Id, \Name, \Oem, \Tag) in \Models/\
  • Added \AvdManagerRunner.ListDeviceProfilesAsync()\ — runs \�vdmanager list device\ and parses output
  • Internal \ParseDeviceListOutput()\ static method for testability
  • 6 unit tests covering multiple profiles, empty output, Windows newlines, missing fields
  • Updated \PublicAPI.Unshipped.txt\ for both
    et10.0\ and
    etstandard2.0\

Closes #321

…meration

Add ListDeviceProfilesAsync() and ParseDeviceListOutput() to
AvdManagerRunner. Runs 'avdmanager list device' and parses the output
into AvdDeviceProfile records (Id, Name, Oem, Tag).

Includes AvdDeviceProfile record model, 6 unit tests, and PublicAPI
entries for both net10.0 and netstandard2.0.

Closes #321

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 8, 2026 16:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-class support in Xamarin.Android.Tools.AndroidSdk for enumerating AVD device profiles (hardware definitions) by running avdmanager list device, returning strongly-typed results for consumers (IDE extensions, GUI tools, CLIs).

Changes:

  • Introduced AvdDeviceProfile record model (Id, Name, Oem, Tag).
  • Added AvdManagerRunner.ListDeviceProfilesAsync() plus ParseDeviceListOutput() to parse avdmanager list device output.
  • Added unit tests for parsing behavior across multiple profiles, empty/header-only output, missing name fallback, and Windows newlines; updated PublicAPI unshipped entries for both TFMs.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/Xamarin.Android.Tools.AndroidSdk-Tests/AvdManagerRunnerTests.cs Adds parsing-focused unit tests for device profile enumeration.
src/Xamarin.Android.Tools.AndroidSdk/Runners/AvdManagerRunner.cs Implements the new API to run avdmanager list device and parse results.
src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt Declares the new public API surface for netstandard2.0.
src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/net10.0/PublicAPI.Unshipped.txt Declares the new public API surface for net10.0.
src/Xamarin.Android.Tools.AndroidSdk/Models/AvdDeviceProfile.cs Adds the new public model type representing a device profile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add AvdManagerRunner.ListDeviceProfilesAsync() for AVD device profile enumeration

2 participants